Note: For browser security reasons the AJAX demos don't work offline. You can view the demos on the RGraph website here: https://www.rgraph.net/demos/index.html

A horizontal bar chart fetching data via AJAX

[No canvas support]

This goes in the documents header:
<script src="RGraph.common.core.js"></script>
<script src="RGraph.hbar.js"></script>
Put this where you want the chart to show up:
<canvas id="cvs" width="600" height="600">
    [No canvas support]
</canvas>
This is the code that generates the chart:
<script>
   RGraph.AJAX.getCSV('/getdata.html', function (data)
   {
        var hbar = new RGraph.HBar({
            id: 'cvs',
            data: data,
            options: {
                grouping: 'grouped',
                vmargin: 5,
                labels: ['Charlie','Jake','Luis','Jack','Bernie','Luis','Bob','Joe','Jack','Cynthia'],
                colors: ['Gradient(white:#3366CC:#3366CC)'],
                backgroundGridAutofitNumhlines: 10,
                backgroundGridAutofitNumvlines: 5,
                scaleZerostart: true,
                textAccessible: true,
                textSize: 16,
                gutterLeft: 100
            }
        }).draw();
   });
</script>